<%= form_for(@cy) do |f| %>
    <% if @cy.errors.any? %>
        <div id="error_explanation">
          <!--<ul>-->
            <!--<!% @cy.errors.full_messages.each do |msg| %>-->
                <!--<li><!%= msg %></li>-->
            <!--<!% end %>-->
          <!--</ul>-->
        </div>
    <% end %>
    <%= form_for(@cy) do |f| %>

        <table class="edit_table">
          <tr>
            <td style="width: 150px;"><%=f.label(t 'activerecord.attributes.cy.name') %></td>
            <td><%= f.text_field :name  %><%= @cy.diy_error_msg :name%></td>
          </tr>
          <tr>
            <td><%=f.label(t 'activerecord.attributes.cy.address') %></td>
            <td><%= f.text_field :address  %><%= @cy.diy_error_msg :address%></td>
          </tr>
          <tr>
            <td><%=f.label(t 'activerecord.attributes.cy.code') %></td>
            <td><%= f.text_field :code  %><%= @cy.diy_error_msg :code%></td>
          </tr>
          <tr>
            <td style="width: 150px;"><%= f.label(t 'activerecord.attributes.cy.phone') %></td>
            <td><%= f.text_field :phone  %><%= @cy.diy_error_msg :phone%></td>
          </tr>
          <tr>
            <td><%=f.label(t 'activerecord.attributes.cy.longitude') %></td>
            <td><%= f.text_field :longitude  %><%= @cy.diy_error_msg :longitude%></td>
          </tr>
          <tr>
            <td><%=f.label(t 'activerecord.attributes.cy.latitude') %></td>
            <td><%= f.text_field :latitude  %><%= @cy.diy_error_msg :latitude%></td>
          </tr>
          <%= f.fields_for :user do |user| %>
              <tr>
                <td style="width: 150px;"><%= f.label(t 'activerecord.attributes.user.login') %></td>
                <td><%= user.text_field :login  %><%= @cy.user.diy_error_msg :login%></td>
              </tr>
              <tr>
                <td><%= f.label(t 'activerecord.attributes.user.user_name') %></td>
                <td><%= user.text_field :user_name  %><%= @cy.user.diy_error_msg :user_name%></td>
              </tr>
              <tr>
                <td><%= f.label(t 'activerecord.attributes.user.email') %></td>
                <td><%= user.text_field :email  %><%= @cy.user.diy_error_msg :email%></td>
              </tr>
              <tr>
                <td><%= f.label(t 'activerecord.attributes.user.password') %></td>
                <td><%= user.password_field :password  %><%= @cy.user.diy_error_msg :password%></td>
              </tr>
              <tr>
                <td><%= f.label(t 'activerecord.attributes.user.password_confirmation') %></td>
                <td><%= user.password_field :password_confirmation  %><%= @cy.user.diy_error_msg :password_confirmation%></td>
              </tr>
          <% end %>
          <tr>
            <td></td>
            <td><%= link_to (t 'common.confirm'), "#", {:id => "sure-btn", :class => "inline-block s-btn"} %></td>
          </tr>
        </table>

    <% end %>
<% end %>
